import xadmin
from xadmin import views
from .models import *


class GlobalStetings(object):
    """xadmin的全局配置"""
    site_title = '超聘'  # 设置站点标题
    site_footer = '超聘后台管理'  # 设置站点的页脚
    menu_style = 'accordion'  # 设置菜单折叠


class baseStetings(object):
    enable_themes = True
    use_bootswatch = True


class spi_User_Admin(object):
    list_display = ('pk', 'user_name', 'user_phone', 'user_mail') #定义显示字段
    list_display_links = ('user_name',)  # 定制列可以点击跳转


xadmin.site.register(views.CommAdminView, GlobalStetings)
xadmin.site.register(views.BaseAdminView, baseStetings)
xadmin.site.register(spi_User, spi_User_Admin)
xadmin.site.register(spi_RecruitmentInfo)
xadmin.site.register(spi_RecruitmentCompany)
xadmin.site.register(spi_workExperience)
xadmin.site.register(spi_UserCompanyInfo)
xadmin.site.register(spi_resume)
xadmin.site.register(spi_CompanyHR)
